/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Graphic;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.Toolkit;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.Serializable;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author macbook
 */
public class CardOnHands extends JPanel implements Serializable{
    /**
	 *
	 */
	private static final long serialVersionUID = 1L;
    ImageIcon icon = new ImageIcon("src/carte_small/asso_cuori.jpg");
    JButton b;
    Image img1 = Toolkit.getDefaultToolkit().getImage("src/carte_small/asso_cuori.jpg");

    public CardOnHands(){

        

        //aggiunta mouseListener evento: Pressione del mouse
        addMouseListener(new MouseAdapter(){
            @Override
             public void mousePressed(MouseEvent e) {
               //System.out.println("Click in Area 1");
               System.out.println("Click X: "+e.getX());
               System.out.println("Click Y: "+e.getY());
               System.out.println();
             }
        });

       
    }


    //Disegno Componenti
    protected void paintComponent(Graphics g){
            super.paintComponent(g);
            Graphics2D g2d = (Graphics2D) g;
            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
           // new JButton(icon);
          //  g2d.drawImage(img1,10,10,this);


    }

/*
    protected void DrawCard(int x, int y, ArrayList<PositionArea> vettore, ArrayList<Image> vettoreImage){
      this.vettoreArea=vettore;
      this.vettoreImage=vettoreImage;
      repaint();


    }*/
}
